using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MultidimensionTools._NetCDF
{
    /// <summary>
    /// <para>Make NetCDF Raster Layer</para>
    /// <para>Makes a raster layer from a netCDF file.</para>
    /// <para>根据 netCDF 文件创建栅格图层。</para>
    /// </summary>    
    [DisplayName("Make NetCDF Raster Layer")]
    public class MakeNetCDFRasterLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeNetCDFRasterLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_netCDF_file">
        /// <para>Input netCDF File</para>
        /// <para>The input netCDF file.</para>
        /// <para>输入 netCDF 文件。</para>
        /// </param>
        /// <param name="_variable">
        /// <para>Variable</para>
        /// <para>The variable of the netCDF file used to assign cell values to the output raster. This is the variable that will be displayed, such as temperature or rainfall.</para>
        /// <para>netCDF 文件的变量，用于将像元值分配给输出栅格。这是将显示的变量，例如温度或降雨量。</para>
        /// </param>
        /// <param name="_x_dimension">
        /// <para>X Dimension</para>
        /// <para>A netCDF dimension used to define the x, or longitude, coordinates of the output layer.</para>
        /// <para>用于定义输出图层的 x 或经度坐标的 netCDF 维度。</para>
        /// </param>
        /// <param name="_y_dimension">
        /// <para>Y Dimension</para>
        /// <para>A netCDF dimension used to define the y, or latitude, coordinates of the output layer.</para>
        /// <para>用于定义输出图层的 y 或纬度坐标的 netCDF 维度。</para>
        /// </param>
        /// <param name="_out_raster_layer">
        /// <para>Output Raster Layer</para>
        /// <para>The name of the output raster layer.</para>
        /// <para>输出栅格图层的名称。</para>
        /// </param>
        public MakeNetCDFRasterLayer(object _in_netCDF_file, object _variable, object _x_dimension, object _y_dimension, object _out_raster_layer)
        {
            this._in_netCDF_file = _in_netCDF_file;
            this._variable = _variable;
            this._x_dimension = _x_dimension;
            this._y_dimension = _y_dimension;
            this._out_raster_layer = _out_raster_layer;
        }
        public override string ToolboxName => "Multidimension Tools";

        public override string ToolName => "Make NetCDF Raster Layer";

        public override string CallName => "md.MakeNetCDFRasterLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_netCDF_file, _variable, _x_dimension, _y_dimension, _out_raster_layer, _band_dimension, _dimension_values, _value_selection_method.GetGPValue(), _cell_registration.GetGPValue()];

        /// <summary>
        /// <para>Input netCDF File</para>
        /// <para>The input netCDF file.</para>
        /// <para>输入 netCDF 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input netCDF File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_netCDF_file { get; set; }


        /// <summary>
        /// <para>Variable</para>
        /// <para>The variable of the netCDF file used to assign cell values to the output raster. This is the variable that will be displayed, such as temperature or rainfall.</para>
        /// <para>netCDF 文件的变量，用于将像元值分配给输出栅格。这是将显示的变量，例如温度或降雨量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Variable")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _variable { get; set; }


        /// <summary>
        /// <para>X Dimension</para>
        /// <para>A netCDF dimension used to define the x, or longitude, coordinates of the output layer.</para>
        /// <para>用于定义输出图层的 x 或经度坐标的 netCDF 维度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("X Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _x_dimension { get; set; }


        /// <summary>
        /// <para>Y Dimension</para>
        /// <para>A netCDF dimension used to define the y, or latitude, coordinates of the output layer.</para>
        /// <para>用于定义输出图层的 y 或纬度坐标的 netCDF 维度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Y Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _y_dimension { get; set; }


        /// <summary>
        /// <para>Output Raster Layer</para>
        /// <para>The name of the output raster layer.</para>
        /// <para>输出栅格图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster_layer { get; set; }


        /// <summary>
        /// <para>Band Dimension</para>
        /// <para>A netCDF dimension used to create bands in the output raster. Set this dimension if a multiband raster layer is required. For instance, altitude might be set as the band dimension to create a multiband raster where each band represents temperature at that altitude.</para>
        /// <para>用于在输出栅格中创建波段的 netCDF 维度。如果需要多波段栅格图层，请设置此尺寸。例如，可以将海拔设置为波段维度以创建多波段栅格，其中每个波段表示该海拔高度的温度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Band Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _band_dimension { get; set; } = null;


        /// <summary>
        /// <para>Dimension Values</para>
        /// <para><xdoc>
        ///   <para>The value (such as 01/30/05) of the dimension (such as Time) or dimensions to use when displaying the variable in the output layer. By default, the first value of the dimension or dimensions will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Dimension—A netCDF dimension.</bullet_item><para/>
        ///     <bullet_item>Value—The dimension value to use.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在输出图层中显示变量时要使用的维度（例如 Time）的值（例如 01/30/05）。默认情况下，将使用一个或多个维度的第一个值。</para>
        ///   <bulletList>
        ///     <bullet_item>维度 - netCDF 维度。</bullet_item><para/>
        ///     <bullet_item>值 - 要使用的维度值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dimension Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _dimension_values { get; set; } = null;


        /// <summary>
        /// <para>Value Selection Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the dimension value selection method that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>By value—The input value is matched with the actual dimension value.</bullet_item><para/>
        ///     <bullet_item>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的尺寸值选择方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按值 - 输入值与实际尺寸值匹配。</bullet_item><para/>
        ///     <bullet_item>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value Selection Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _value_selection_method_value _value_selection_method { get; set; } = _value_selection_method_value._BY_VALUE;

        public enum _value_selection_method_value
        {
            /// <summary>
            /// <para>By index</para>
            /// <para>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</para>
            /// <para>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</para>
            /// </summary>
            [Description("By index")]
            [GPEnumValue("BY_INDEX")]
            _BY_INDEX,

            /// <summary>
            /// <para>By value</para>
            /// <para>By value—The input value is matched with the actual dimension value.</para>
            /// <para>按值 - 输入值与实际尺寸值匹配。</para>
            /// </summary>
            [Description("By value")]
            [GPEnumValue("BY_VALUE")]
            _BY_VALUE,

        }

        /// <summary>
        /// <para>Cell Registration</para>
        /// <para><xdoc>
        ///   <para>Specifies the location of the cell registration.</para>
        ///   <bulletList>
        ///     <bullet_item>Center—Cell registration at the center of the cell. This is the default.</bullet_item><para/>
        ///     <bullet_item>Lower Left—Cell registration at the lower left of the cell.</bullet_item><para/>
        ///     <bullet_item>Upper Left—Cell registration at the upper left of the cell.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定单元注册的位置。</para>
        ///   <bulletList>
        ///     <bullet_item>中心 （Center） - 像元中心处的像元配准。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>左下角 - 单元格左下角的单元格配准。</bullet_item><para/>
        ///     <bullet_item>左上角 （Upper Left） - 单元格左上角的单元格配准。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Registration")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _cell_registration_value _cell_registration { get; set; } = _cell_registration_value._CENTER;

        public enum _cell_registration_value
        {
            /// <summary>
            /// <para>Center</para>
            /// <para>Center—Cell registration at the center of the cell. This is the default.</para>
            /// <para>中心 （Center） - 像元中心处的像元配准。这是默认设置。</para>
            /// </summary>
            [Description("Center")]
            [GPEnumValue("CENTER")]
            _CENTER,

            /// <summary>
            /// <para>Lower Left</para>
            /// <para>Lower Left—Cell registration at the lower left of the cell.</para>
            /// <para>左下角 - 单元格左下角的单元格配准。</para>
            /// </summary>
            [Description("Lower Left")]
            [GPEnumValue("LOWER_LEFT")]
            _LOWER_LEFT,

            /// <summary>
            /// <para>Upper Left</para>
            /// <para>Upper Left—Cell registration at the upper left of the cell.</para>
            /// <para>左上角 （Upper Left） - 单元格左上角的单元格配准。</para>
            /// </summary>
            [Description("Upper Left")]
            [GPEnumValue("UPPER_LEFT")]
            _UPPER_LEFT,

        }

        public MakeNetCDFRasterLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}